const { usePublic } = $globalStore
const getDictionaryData = async (val) => {
  const res = await usePublic.getDictionary(val)
  if (res.code == 0) {
    let arr = []
    res.data.forEach((element) => {
      let obj = {
        text: element.configName,
        value: element.id,
      }
      arr.push(obj)
    })
    return arr
  }
}

export { getDictionaryData }
